interface Iterator {
	boolean hasNext();
	Object next();
	void remove();
}

public class Employee {

	public static Object empList;

	public Employee(int id, String name, String address, String gender) {
		Employee.empList = name;
	}

	@SuppressWarnings("unused")
	public static void main(String[] args) {
		
			ArrayList<Employee> empList = new ArrayList<Employee>();
			empList.add(new Employee(10, "Girish", "Bangalore", "male"));
			empList.add(new Employee(16, "Umesh", "Shimoga", "male"));
			empList.add(new Employee(18, "Ananth", "London", "male"));
			empList.add(new Employee(23, "Radha", "Tumkur", "female"));
			empList.add(new Employee(32, "Sharada", "Mangalore", "female"));
		
	Iterator iterator = (Iterator) (empList.iterator());
	Employee tempEmp;
	for(Employee ee : empList) {
		tempEmp = (Employee) iterator.next();
		System.out.println("Employee Name:" +tempEmp.getName());
		System.out.println("Employee ID:  " +tempEmp.getId());
	}
	
	Iterator iterator2 = (Iterator) empList.iterator();
	while(iterator2.hasNext()) {
		System.out.println(" " +(Employee) iterator2.next());
	}
	
	Iterator iterator3 = (Iterator) empList.iterator();
	while(iterator3.hasNext()) {
		System.out.println(" " + ((Employee) iterator3.next()).getId());
	}

	}

	private String getId() {

		return getId();
	}

	private String getName() {

		return getName();
	}

}